{extend name="layout" /}
{block name="content"}
<div class="layui-form" lay-filter="LAY-user-permission" id="LAY-user-permission" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">上级</label>
        <div class="layui-input-inline">
            <select name="parent_id" lay-verify="required" lay-search="">
                <option value="0">顶级</option>
                {foreach $menu as $vo}
                <option value="{$vo.id}" {if isset($info) && $info.parent_id==$vo.id}selected{/if}>{$vo.html}{$vo.title}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-inline">
            <input type="text" name="title" lay-verify="required" placeholder="请输入名称" autocomplete="off"
                   class="layui-input" value="{$info.title|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">标识</label>
        <div class="layui-input-inline">
            <input type="text" name="name" placeholder="请输入标识" autocomplete="off"
                   class="layui-input" value="{$info.name|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">地址</label>
        <div class="layui-input-inline">
            <input type="text" name="route" placeholder="请输入地址 (模块/控制器/方法)" autocomplete="off"
                   class="layui-input" value="{$info.route|default=''}">
        </div>
        <label></label>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <div class="layui-input-inline">
            <input type="text" name="icon" placeholder="请输入图标" autocomplete="off"
                   class="layui-input" value="{$info.icon|default=''}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-inline">
            <input type="number" name="sort" lay-verify="number" placeholder="请输入排序" autocomplete="off"
                   class="layui-input" value="{$info.sort|default=0}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
            <input type="checkbox" {if isset($info) && $info.status}checked=""{/if} lay-filter="status" name="status" lay-skin="switch" lay-text="显示|隐藏">
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="LAY-user-permission-submit" id="LAY-user-permission-submit" value="确认">
    </div>
</div>
{/block}